﻿using System;

namespace YAMM.PlugInManagement.Menu.MenuBar
{
    using PlugIn;

    class ToolStripComboBox : System.Windows.Forms.ToolStripComboBox, IToolStripComboBox
    {
        #region IToolStripComboBox Members

        public new System.Windows.Forms.ComboBox.ObjectCollection Items
        {
            get
            {                
                return base.Items;                
            }            
        }

        public new string Text
        {
            get
            {
                if (base.SelectedIndex > -1)
                    return Items[base.SelectedIndex].ToString();
                else
                    return base.Text;
            }
            set
            {
                Text = value;
            }
        }
        
        #endregion


        #region IToolStripItem Members

        public Guid Identifier { get; internal set; }

        #endregion

        public ToolStripComboBox()
            : base()
        {
            DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            AutoSize = false;
        }        
    }
}
